export interface generalType{
    code: number,
    message: string,
    ok:boolean
}

// 定义销售列表
export interface salAll {
    id?: number | string;
    spuId?: number | string;
    baseSaleAttrId?: number|string;
    saleAttrName?:string;
    spuSaleAttrValueList?: salList[];
    flag?: boolean;
} 

export interface recordsChild {
    id?: number;
    spuName: string | number;
    description: string | number;
    category3Id: string | number;
    tmId: number;
    spuSaleAttrList: salAll | [];
    spuImageList: null | [];
}

export type records = recordsChild[];

export interface spuResType extends generalType {
    data: {
        records: records;
        total: number;
        size: number;
        current: number;
        searchCount: boolean;
        pages: number;
    };
}

// 定义SPU的品牌名称的类型
export interface proNameGen {
    id: number|string;
    tmName:string;
    logoUrl: string;
}
// 定义品牌名称的data
export type proData = proNameGen[]
// 定义品牌名称的类型
export interface proName extends generalType {
    data: proData;
}

// 定义SKU的图片类型
export interface skuImgGen {
    id?: number|string;
    spuId?: number;
    imgName?: string
    imgUrl?: string
    name?: string
    url?:string
}
// 定义图片的data
export type imgData = skuImgGen[];
// 定义图片的类型
export interface skuImgType extends generalType {
    data: imgData;
}

// 定义销售值列表数组
export interface salList {
    id?: number|string;
    spuId?: number|string;
    baseSaleAttrId?: number;
    saleAttrValueName: string;
    saleAttrName?: string;
    isChecked?: null;
}

// 定义列表类型
export type salListArr = salList[]


// 定义销售列表数组
export type salAllArr =salAll[]

// 完成销售列表的类型
export interface comSal extends generalType {
    data: salAllArr;
}

// 颜色 尺寸 名字
export interface threeTypeGen {
    id: number|string;
    name: string;
}
// 数组类型
export type threeTypeGenArr = threeTypeGen[]

// 完成定义类型
export interface comThree{ 
    data:threeTypeGenArr
}

// 定义平台属性内部
export interface plat {
    id: number;
    valueName: string;
    attrId: number;
}

export type plats = plat[];

export interface platsDateValue {
    attrName: string;
    attrValueList: plats;
    categoryId: number;
    categoryLevel: number;
    id:number
}

export interface platsData {
    data: platsDateValue;
}

